n,m,t=100,2000,200

1.upto(m) {|i|
	a,b = rand(n),rand(n)
	a,b = rand(n),rand(n) while a==b
	puts "node#{a},node#{b},edge#{i},#{rand(65535)}"
}
puts
1.upto(t) {
	a,b = rand(n),rand(n)
	a,b = rand(n),rand(n) while a==b
	puts "node#{a},node#{b}"
}